package com.simple.parser.model;

import java.util.Arrays;

/**
 * 项目名称：foursmile-local-etl
 * 类名称：Tuple
 * 类描述：Tuple
 * 创建时间：2022/10/18
 *
 * @author jiangjunjie   (E-mail:jiangjunjie@foursmile001.com)
 * @version v1.0
 */
public class Tuple {

    private final Object[] members;

    public Tuple(Object... members) {
        this.members = members;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + Arrays.deepHashCode(members);
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Tuple other = (Tuple) obj;
        return Arrays.deepEquals(members, other.members);
    }

}
